package com.plian.system.wrapper.hr.staff;

import com.plian.Tools.DateUtil;
import com.plian.system.dto.hr.staff.AppointRemoveDTO;
import com.plian.system.entity.hr.staff.AppointRemove;
import com.plian.system.mybatis.support.BaseWrapper;
import com.plian.system.vo.hr.staff.AppointRemoveVO;
import com.plian.system.wrapper.util.CacheWrapperUtil;
import com.plian.system.wrapper.util.WrapperUtil;
import org.mapstruct.Mapper;
import org.mapstruct.Mapping;
import org.mapstruct.Mappings;

import static com.plian.system.wrapper.util.WrapperConstant.SPRING;

/**
 * 任免记录包装类,返回视图层所需的字段
 *
 * @author gangan
 * @since 2019-09-30
 */
@Mapper(componentModel = SPRING, uses = {CacheWrapperUtil.class, WrapperUtil.class})
public interface AppointRemoveWrapper extends BaseWrapper<AppointRemove, AppointRemoveDTO, AppointRemoveVO> {

	@Override
	@Mappings(value = {
			@Mapping(source = "meetingDecisionDate", target = "meetingDecisionDateStr", dateFormat = DateUtil.PATTERN_DATE_POINT)
	})
	AppointRemoveVO entityToVO(AppointRemove entity);
}
